<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:ui="http://java.sun.com/jsf/facelets" 
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
	<ui:composition template="./main.xhtml">
		<ui:define name="content">
		<br/>
		<p:messages autoUpdate="true" closable="true" />
		<h:form>
		<p:panelGrid columns="1">
			<f:facet name="header">
				権限詳細画面
   			</f:facet>
			<p:dataTable value="#{staffGroupConversation.selectStaffGroup.functionSecuritySettings}" var="record" emptyMessage="グループがないです。">
				<p:column headerText="機能">
					<h:outputText value="#{record.function.label}"/>
				</p:column>
				<p:column headerText="権限">
					<p:selectOneMenu value="#{record.securityRole}">
						<f:selectItems value="#{record.function.securityRoles}" var="o" itemLabel="#{o.label}" itemValue="#{o}" />
					</p:selectOneMenu>
				</p:column>
			</p:dataTable>
		</p:panelGrid>
		<br />
		<p:commandButton action="#{staffGroupController.saveStaffGroup}" value="保存" styleClass="button_big"/>
		<p:commandButton action="#{staffGroupController.cancel}" value="キャンセル" immediate="true" styleClass="button_big"/>
		</h:form>
		</ui:define>
	</ui:composition>
</html>